Digital video cameras have become very popular in recent times. Many of these cameras and, in particular, the mini-digital video (mini-DV) type of digital cameras, produce frames of a video sequence (or “stream”) in interlaced format as opposed to progressive video format.
An interlaced video frame comprises two fields, which are captured at successive times and are separated by a regular interval. A dominant field of the frame is captured at time T and a corresponding non-dominant field is captured at time T+Δ, where Δ represents field period, which is equal to half the frame period. Therefore, the dominant field of a video frame occurs prior to the non-dominant field in time. This is referred to as “field order”. For the purpose of playing back one or more interlaced video frames, the dominant field of a particular frame is always displayed before a corresponding non-dominant field.
Video frames may be formatted according to either one of two types of field order, referred to as ‘Top Field First (TFF)’ and ‘Bottom Field First (BFF)’. The top field of a video frame comprises scan-lines 1, 3, 5 . . . etc, when counting from the top row of a video frame. The bottom field of a video frame comprises scan-lines 2, 4, 6 . . . etc, again, when counting from the top row of a video frame. In TFF formatted video frames, the dominant field is the top field of the video frame and the non-dominant field is the bottom field. Conversely, in BFF formatted video frames, the bottom field forms the dominant field and the top field forms the non-dominant field.
When editing video sequences produced by a digital video camera, often users wish to apply effects to one or more frames of the video sequence. Sometimes users wish to combine multiple input video sequences to produce a single output video sequence. For example, a user may wish to produce a picture-in-picture video display sequence out of two input video sequences. Sometimes, users also wish to export an edited video sequence back to a mini-DV tape for archiving or to be played back on a television, for example.
When editing an input video sequence to generate an output video sequence, it is important that the field order of the input video sequence(s) is preserved. That is, if field A of an input video frame occurs before field B of the input video frame, then the corresponding fields A and B of a corresponding output video frame must be in the same order.
In certain circumstances, maintaining the field order of the frames of a video sequence can be a problem. Firstly, output video frames of a sequence of frames may have a different field order to the corresponding input video frames. For example, the frames of the input video sequence may be formatted as TFF while the required output field order may be BFF. Secondly, input video frames of a plurality of video sequences being used to produce a single output video sequence may have different field orders to one another. For example, the frames of one or more input video sequences may be TFF formatted and the frames of the other input video sequence(s) may be BFF, while the required output field order may be either TFF or BFF. Still further, scaling and/or translation applied to the frames of an input video sequence may affect the field order of the video sequences. In each of these circumstances, the field order of the input video frames may be reversed in corresponding output video frames.
As an example, FIG. 11 shows a TFF formatted input video frame 1110. As seen in FIG. 11, the top field (i.e., scan-lines 1A, 3A . . . etc) of the video frame 1110 is shown drawn on the left-hand side of the frame 1110. The bottom field (i.e., scan-lines 2B, 4B . . . etc) is shown drawn on the right-hand side of the frame 1110. In the example of FIG. 11, the top field is displayed at time, T, before the bottom field, which is displayed at time T+Δ. FIG. 11 also shows a second video frame 1120, which has a BFF field order. For the frame 1120, the bottom field (i.e., scan-lines 2D, 4D . . . etc) is drawn on the left of the frame 1120 and the top field (i.e., scan-lines 1C, 3C . . . etc) is drawn on the right of the frame 1120.
In the example of FIG. 11, the two video frames 1110 and 1120 having different field orders are combined to generate an interlaced output video frame 1130, in accordance with a conventional method. The generated output video frame 1130 is a blend of the two input video frames 1110 and 1120. As seen in FIG. 11, the problem with the video frame 1130 is that the top field (i.e., scanlines 1A+1C, 3A+3C . . . etc) of the video frame 1130 comprises the top field (i.e., scanlines 1A, 3A . . . etc) of the video frame 1110, which occurs at time T, and the top field (i.e., scanlines 1C, 3C . . . etc) of the video frame 1120, which occurs at time T+Δ. Further, the bottom field (i.e., scanlines 2B+2D, 4B+4D . . . etc) of the video frame 1130 comprises the bottom field (i.e., scanlines 2B, 4B . . . etc) of the video frame 1110, which occurs at time T+Δ, and the bottom field (i.e., scanlines 2D, 4D . . . etc) of the video frame 1120, which occurs at time T.
As another example, FIGS. 12A and 12B show video frames 1210 and 1220, respectively. The video frame 1210 is formatted as TFF and the video frame 1220 is formatted as BFF. Output video frames 1215 and 1225 corresponding to the video frames 1210 and 1220, respectively, are also shown in FIGS. 12A and 12B. The output video frames 1215 and 1225 have been generated in accordance with conventional methods and are shown in output buffers 1216 and 1226, respectively. The output video frame 1215 is formatted as BFF and the output video frame 1225 is formatted as TFF. As seen in FIGS. 12A and 12B, the fields (i.e., scanlines 1A, 2B, 3A, 4B . . . etc) of the output video frames 1215 and 1225 are in reversed order compared to their corresponding input video frames 1210 and 1220, respectively. For example, the top field (i.e., scanlines 1A, 3A . . . etc) of the video frame 1210 that should be displayed at time T is displayed at time T+Δ.
FIGS. 12C and 12D show video frames 1230 and 1240, respectively. The video frame 1230 is formatted as TFF and the video frame 1240 is formatted as BFF. The output video frames 1235 and 1245 corresponding to the input video frames 1230 and 1240, respectively, are also shown in FIGS. 12C and 12D. The output video frames 1235 and 1245 are shown in output buffers 1237 and 1247, respectively. The video frame 1235 is formatted as TFF and the video frame 1240 is formatted as BFF. That is, the field order of the input frames 1230 and 1240 is the same as that of their corresponding output frames 1235 and 1245, respectively. However, in the example of FIGS. 12C and 12D, the output video frames 1235 and 1245 are generated at a vertical displacement of one scan-line in their corresponding output buffers 1237 and 1247, respectively. As seen in FIGS. 12C and 12D, the fields (i.e., scanlines 1A, 2B, 3A, 4B1 . . . etc) of the output video frames 1235 and 1245 are in reversed order compared to their corresponding input video frames 1230 and 1240, respectively. For example, the top field (i.e., scanlines 1A, 3A . . . etc) of the video frame 1230 that should be displayed at time T is displayed at time T+Δ.
There are several known methods used by software applications when processing interlaced video frames in order to overcome the above problems. In one of these known methods, the input video frames may be de-interlaced and such that processing occurs on progressive frames. In this instance, the progressive frames need to be re-interlaced in appropriate order to produce an interlaced output. A problem with such a method is that two conversions (i.e., the de-interlace and re-interlace processes) need to be performed. Further, information may be lost during these conversions.
Other known methods of processing interlaced video frames lack support for different field orders between input video frames and corresponding output video frames. Such methods are also typically not able to combine multiple input video frames interlaced in different formats (e.g., TFF or BFF). Finally, such methods typically do not support scaling and translation operations.
Thus a need clearly exists for a more efficient and accurate method of generating one or more interlaced video frames.